package edu.auctionmart

class Profile {
	
	static hasMany = [feedbackReceived: Feedback, feedbackGiven: Feedback, addresses: Location]
	static belongsTo = User
	
	String contactPhoneNumber
	String contactEmail
	
    static constraints = {
		contactPhoneNumber(nullable: true, validator: {return it == null || it.toString().length() == 10 })
		contactEmail(email: true, nullable: true)
		addresses(nullable: true)
		feedbackReceived(nullable: true)
		feedbackGiven(nullable: true)
    }
}
